package com.zhu.nio.selector;

import java.io.IOException;
import java.io.RandomAccessFile;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
import java.nio.channels.SelectionKey;
import java.nio.channels.Selector;

/**
 * Created by ehsy_it on 2016/4/12.
 */
public class SelectorTest {

    public static void main(String[] args) throws IOException{
        Selector selector = Selector.open();
        int k1 = SelectionKey.OP_ACCEPT; // 2^4
        int k2 = SelectionKey.OP_CONNECT;
        int k3 = SelectionKey.OP_READ;
        int k4 = SelectionKey.OP_WRITE;

        System.out.println(k1);
        System.out.println(k2);
        System.out.println(k3);
        System.out.println(k4);

        System.out.println(8%-2);
        System.out.println(System.currentTimeMillis());
    }
}
